import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '@/components/Home.vue'
import WelcomeView from "../views/WelcomeView.vue";
import EmployeeList from '../components/systemManage/personManage/employee/EmployeeList.vue'
import MaterialinfoMt from '@/components/systemManage/materialManage/MaterialinfoMt.vue'
import MaterialinQuery from '@/components/systemManage/materialManage/MaterialinQuery.vue'
import AddEmployee from '../components/systemManage/personManage/employee/AddEmployee.vue'
import MPDadd from '../components/systemManage/materialManage/MPDadd.vue'
import EditMaterialInfo from '@/components/systemManage/materialManage/EditMaterialInfo.vue'
import AddMateriaInfo from '@/components/systemManage/materialManage/AddMateriaInfo.vue'
import MaterialStorage from '@/components/systemManage/materialManage/MaterialStorage.vue';
import AddMaterialStorage from '@/components/systemManage/materialManage/AddMaterialStorage.vue';
import DictMaintenance from '../components/systemManage/systemSetting/DictMaintenance.vue';
import UpdateEmployee from '../components/systemManage/personManage/employee/UpdateEmployee.vue'
import LeaveList from '../components/systemManage/personManage/employeeleave/LeaveList.vue'
import RestList from '@/components/systemManage/personManage/employeerest/RestList.vue';
import MaterialStorageInfo from '@/components/systemManage/materialManage/MaterialStorageInfo.vue';
import MaterialStorageAudit from '@/components/systemManage/materialManage/MaterialStorageAudit.vue';
import UpdatePW from '@/components/systemManage/UpdatePW.vue'
import BasicInfo from '@/components/systemManage/institutionManage/BasicInfo.vue';
import ExtendedInfo from '@/components/systemManage/institutionManage/ExtendedInfo.vue';
import ServiceFacilities from '@/components/systemManage/institutionManage/ServiceFacilities.vue';
import Term from '@/components/systemManage/institutionManage/Term.vue';
import Note from '@/components/systemManage/institutionManage/Note.vue';
import EmployeeAuthSetting from '@/components/systemManage/systemSetting/EmployeeAuthSetting.vue';
import Log from '@/components/systemManage/systemSetting/Log.vue';
import EditMaterialStorage from '@/components/systemManage/materialManage/EditMaterialStorage.vue';
import RecRegistration from '@/components/serviceManage/receptionSetting/RecRegistration.vue';
import SettingBed from '@/components/serviceManage/bedManage/setbed/SettingBed.vue';
import ChangeRoom from '@/components/serviceManage/bedManage/changeroom/ChangeRoom.vue';
import AddUser from '@/components/serviceManage/userSetting/userArchives/AddUser.vue';
import UpdateUser from '@/components/serviceManage/userSetting/userArchives/UpdateUser.vue';
import LookUserArcDetail from '@/components/serviceManage/userSetting/userArchives/LookUserArcDetail.vue';
import ServiceProject from '@/components/serviceManage/serviceProjectManage/ServiceProject.vue';
import Nursinglevel from '@/components/serviceManage/serviceProjectManage/Nursinglevel.vue';
import Announcement from '@/components/systemManage/institutionManage/Announcement.vue';
import UpdateAnno from '@/components/systemManage/institutionManage/UpdateAnno.vue';
import AddAnno from '@/components/systemManage/institutionManage/AddAnno.vue';
import AnnoList from '@/components/systemManage/institutionManage/AnnoList.vue';
import Userin from '@/components/serviceManage/userSetting/userIn/Userin.vue';
import AddUserIn from '@/components/serviceManage/userSetting/userIn/AddUserIn.vue';
import LookUserDetail from '@/components/serviceManage/userSetting/userIn/LookUserDetail.vue';
import ChangeBed from '@/components/serviceManage/bedManage/changebed/ChangeBed.vue';
import BedList from '@/components/serviceManage/bedManage/bedManage/BedList.vue';
import FoodListView from '@/components/serviceManage/foodManage/FoodListView.vue';
import NursingManagement from '@/components/serviceManage/serviceProjectManage/NursingManagement.vue';
import FoodPackageListView from '@/components/serviceManage/foodManage/FoodPackageListView.vue';
import PerformCare from '@/components/serviceManage/serviceProjectManage/PerformCare.vue';
import CareReports from '@/components/serviceManage/serviceProjectManage/CareReports.vue';
import ViewReport from '@/components/serviceManage/serviceProjectManage/ViewReport.vue';
import UserArc from '@/components/serviceManage/userSetting/userArchives/UserArc.vue';
import BedChangeRoom from '@/components/serviceManage/bedManage/bedManage/BedChangeRoom.vue';
import BedChangeBed from '@/components/serviceManage/bedManage/bedManage/BedChangeBed.vue';
import UserGoOut from '@/components/serviceManage/userSetting/userGoOut/UserGoOut.vue';
import AddUserOut from '@/components/serviceManage/userSetting/userGoOut/AddUserOut.vue';
import OlderFoodLinkView from '@/components/serviceManage/foodManage/OlderFoodLinkView.vue';
import AddOlderFood from '@/components/serviceManage/foodManage/AddOlderFood.vue';
import UpdateOlderFood from '@/components/serviceManage/foodManage/UpdateOlderFood.vue';
import FinanceListView from '@/components/serviceManage/foodManage/FinanceListView.vue';
import BedQuery from '@/components/serviceManage/bedManage/BedQuery/BedQuery.vue';
import LfRegister from '@/components/serviceManage/receptionSetting/LfRegister.vue';
import LfAdd from '@/components/serviceManage/receptionSetting/LfAdd.vue';
import LookUserOutDetail from '@/components/serviceManage/userSetting/userGoOut/LookUserOutDetail.vue';
import UpdateLf from '@/components/serviceManage/receptionSetting/UpdateLf.vue';
import OlderDetail from '@/components/serviceManage/receptionSetting/OlderDetail.vue';
import OutMoney from '@/components/moneyManage/OutMoney.vue';
import SaveMoney from '@/components/moneyManage/SaveMoney.vue';
import UserGoAway from '@/components/serviceManage/userSetting/userGoAway/UserGoAway.vue';
import LookUserAwayDetail from '@/components/serviceManage/userSetting/userGoAway/LookUserAwayDetail.vue';
import HomeIndex from '@/components/HomeIndex.vue';
import Photo from '@/components/Photo.vue';
import Chat from '@/components/Chat.vue';
import VideoIntroduction from '@/components/systemManage/institutionManage/VideoIntroduction.vue';

Vue.use(VueRouter)

const routes = [

  {
    path: '/home',
    component: Home,
    children: [
      { path: '/employeeList', component: EmployeeList },
      { path: '/materialinfoMt', component: MaterialinfoMt },
      { path: '/mpdadd', component: MPDadd },
      { path: '/addEmployee', component: AddEmployee },
      { path: '/materialinQuery', component: MaterialinQuery },
      { path: '/editMaterialInfo', component: EditMaterialInfo },
      { path: '/addMaterialInfo', component: AddMateriaInfo },
      { path: '/materialStorage', component: MaterialStorage },
      { path: '/addMaterialStorage', component: AddMaterialStorage },
      { path: '/dictMaintenance', component: DictMaintenance },
      { path: '/materialinQuery', component: MaterialinQuery },
      { path: '/updateEmployee', component: UpdateEmployee },
      { path: '/leaveList', component: LeaveList },
      { path: '/restList', component: RestList },
      { path: '/materialStorageInfo', component: MaterialStorageInfo },
      { path: '/materialStorageAudit', component: MaterialStorageAudit },
      { path: '/updatePW', component: UpdatePW },
      { path: '/basicInfo', component: BasicInfo },
      { path: '/extendedInfo', component: ExtendedInfo },
      { path: '/serviceFacilities', component: ServiceFacilities },
      { path: '/term', component: Term },
      { path: '/note', component: Note },
      { path: '/empAuthSet', component: EmployeeAuthSetting },
      { path: '/log', component: Log },
      { path: '/editMaterialStorage', component: EditMaterialStorage },
      { path: '/rRegister', component: RecRegistration },
      { path: '/settingBed', component: SettingBed },
      { path: '/changeRoom', component: ChangeRoom },
      { path: '/userArc', component: UserArc },
      { path: '/addUser', component: AddUser },
      { path: '/updateUser', component: UpdateUser },
      { path: '/lookDetail', component: LookUserArcDetail },
      { path: '/serviceProject', component: ServiceProject },
      { path: '/nursinglevel', component: Nursinglevel },
      { path: '/announcement', component: Announcement },
      { path: '/updateAnno', component: UpdateAnno },
      { path: '/addAnno', component: AddAnno },
      { path: '/annoList', component: AnnoList },
      { path: '/userin', component: Userin },
      { path: '/addUserIn', component: AddUserIn },
      { path: '/lookUserDetail', component: LookUserDetail },
      { path: '/changeBed', component: ChangeBed },
      { path: '/bedList', component: BedList },
      { path: '/FoodListView', component: FoodListView },
      { path: '/nursingManagement', component: NursingManagement },
      { path: '/performCare', component: PerformCare },
      { path: '/performCare', component: PerformCare },
      { path: '/careReports', component: CareReports },
      { path: '/viewReport', component: ViewReport },
      { path: '/foodPackageListView', component: FoodPackageListView },
      { path: '/performCare', component: PerformCare },
      { path: '/userGoOut', component: UserGoOut },
      { path: '/addUserOut', component: AddUserOut },
      { path: '/olderFoodLinkView', component: OlderFoodLinkView },
      { path: '/addOlderFood', component: AddOlderFood },
      { path: '/updateOlderFood', component: UpdateOlderFood },
      { path: '/financeListView', component: FinanceListView },

      { path: '/bedQuery', component: BedQuery },
      { path: '/lookUserOutDetail', component: LookUserOutDetail },
      { path: '/saveMoney', component: SaveMoney },
      { path: '/bedChangeRoom', component: BedChangeRoom },
      { path: '/bedChangeBed', component: BedChangeBed },
      { path: '/lfRegister', component: LfRegister },
      { path: '/lfAdd', component: LfAdd },
      { path: '/updateLf', component: UpdateLf },
      { path: '/olderDetail', component: OlderDetail },
      { path: '/userGoAway', component: UserGoAway },
      { path: '/lookUserAwayDetail', component: LookUserAwayDetail },
      { path: '/homeIndex', component: HomeIndex },
      { path: '/outMoney', component: OutMoney },
      { path: '/photo', component: Photo },
      { path: '/chat', component: Chat },
      { path: '/videoIntroduction', component: VideoIntroduction }


    ]
  },



  {
    path: '/',
    redirect: '/welcome',
  },
  {
    path: '/welcome',
    name: 'welcome',
    redirect: '/welcome/index',
    component: WelcomeView,
    children: [
      {
        path: '/welcome/index',
        component: () => import('../views/index/IndexView.vue')
      },
      {
        path: '/welcome/content',
        redirect: '/welcome/content/info',
        component: () => import('../views/index/IndexContentView.vue'),
        children: [
          {
            path: '/welcome/content/info',
            component: () => import('../views/index/content/SimpleInfoView.vue'),
          },
          {
            path: '/welcome/content/equipment',
            component: () => import('../views/index/content/EquipmentInfoView.vue'),
          },
          {
            path: '/welcome/content/medical',
            component: () => import('../views/index/content/MedicalInfoView.vue'),
          },
        ]
      },
    ]
  },
  {
    path: '/login',
    component: () => import('../components/Login.vue')
  },


]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router